package com.banmoon.command;

import java.util.ArrayList;
import java.util.List;

/**
 * 将军
 */
public class General {

    private List<Army> armyList;

    public General() {
        armyList = new ArrayList<Army>(){{
            add(new Army("调查兵团"));
            add(new Army("宪兵团"));
            add(new Army("驻扎兵团"));
        }};
    }

    public void advance(int i){
        AdvanceCommand advanceCommand = new AdvanceCommand(armyList.get(i));
        advanceCommand.execute();
    }

    public void retreat(int i){
        RetreatCommand retreatCommand = new RetreatCommand(armyList.get(i));
        retreatCommand.execute();
    }

}
